-
Notifications
You must be signed in to change notification settings - Fork 4
WIP feat: Index docs in a worker #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Why was it necessary to migrate the coresTable for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me (I can't approve my own PR). I think it's important to have tests to ensure that the migration works (e.g. persisted cores are not forgotten) because this could be hard to catch in manual QA (it would require force-quitting the app at a specific point, and ensuring the other device is not on the same network when re-starting).
I'd be ok with merging this and doing the tests next, but soon, before QA for the next RC is done, so that we don't release this without tests for this important step.
Are the existing migration tests (once adapted to use workers) sufficient to check this? Or is there more we need to add. |
Not sure, I have a feeling that they are not. Easiest way to check is to comment out the migration code and see if any test fails. |
This would only be noticeable in this sequence:
You would only notice that cores are missing (eg they haven't been persisted) if device B reindexes, because the data will be in the indexes for B. Alternatively, if B syncs with a new device C after migration, are A's cores shared (eg does C get A's data from B) |
Cool yeah I'll see how I can simulate that. I'm also gonna enable workers for all tests first to see if that breaks anything. Seems our sync tests are having trouble already |
The sync test is flakey so there might be a race condition in there regarding indexing. Gotta figure that out before merge |
I feel that the failing test is the thing that needs to change. If you look at my annotated logs, the Invitee is rightfully refusing to replicate its config cores.
|
|
||
t.after(() => manager.stopLocalPeerDiscoveryServer()) | ||
t.after(() => | ||
manager.stopLocalPeerDiscoveryServer({ force: true, timeout: 0 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely this could be reverted once we figure out why this test was having trouble
Initial experimental implementation to fix #132